﻿
                            
     
                           AUTOMATIC LOCK UNLOCK CAR

                                   By WTLS




ABOUT THIS TXT:

This txt content:
- Description,
- Known issues and their fixes,
- Installation,
- How to use,
- Changelog,
- Credits,
- Notes.





DESCRIPTION:

Locking and unlocking personal vehicle requires pressing a button and makes the gameplay a little slow and annoying.
This mod makes the player lock and unlock car automatically and without touching 
a button to improve he flow of the game and it has a lot of features.

Features:
- Automatic lock car when exiting it,
- Automatic lock car when player is inside it,
- Automatic unlock car when trying to enter it (when you want to get in it),
- Alarm and locking/unlocking sound option (not horn sound) (volume editable),
- Lock and unlock only owned vehicles (the script will consider a vehicle owned 
  by the player if it is saved),
- Save vehicle (and make it persistent) auto or by pressing a button,
- Ability to lock/unlock car manually inside and outside the car,
- Automatic lock when canceled entering vehicle,
- Lock only if all car doors are closed,
- Lights on when unlocking (optional) (neon lights on when unlocking if it is installed in the car),
- Coming Home (optional) (it is when you lock the vehicle its headlights stay on for a few seconds)
- Roll up windows (optional),
- Unsave vehicle key option if you want to save the vehicle in a garage,
- Blinkers (optional),
- Interrior lights when unlocking (optional),
- Realistic lights animations,
- Blips,
- Hints,
- Controller support,
- Up to 20 cars.







KNOWN ISSUES AND FIXES:

- A small issue is that the engine is running if lights or blinkers are on, that's
  a Rockstar issue that has programmed car light to turn on only if the engine
  is running.
> Disable "LIGHTS" and "BLINKERS" and "COMINGHOME" in the ini file.

- Can't reenter vehicles like quadbike or a car without doors.
> Disable "AUTOSAVE" in the ini file and don't press the button of "SAVEKEY" while
  driving this kind of vehicles, save other cars manually.

- All saved and locked vehicles will be unlockable if you reload scripts except the 
  vehicle that the player is in.
> Use one vehicle and you must be in it before reloading script OR avoid reloading
  scripts.

- If you exit a vehicle and was locked from inside and you left the door open, you will not be able to enter it again.
> Unlock manually using the Save Key (F10 default) or holding X button on the controller.

- the player still locks unlocks the vehicle after unsaving it.
> not a big deal, doesn't cause any effects only if an allowed NPC will not be able to get in the car. For this last one unlock the vehicle manually using the Save Key or holding X button on the controller.

- Other?
> Report on #bugs-report channel on discord server. If it's a script error, include the text inside "ScriptHookVDotNet.txt" file in GTA5 main directory.






INSTALLATION:

Delete old version,
Put "AutomaticLockUnlock3.dll" file and "AutomaticLockUnlock3.ini" file and 
"NAudio.dll" file and "AutomaticLockUnlock" folder in "scripts" folder.






HOW TO USE:

Enter the car and press the key of SAVEKEY or hold X button on the controller to save the car (can be automatically saved by enabling AUTOSAVE in the ini file but it may cause some issues).
To lock just leave the vehicle and make sure the doors are closed.
To unlock just enter the vehicle normally.
When you are in the car the car is locked automatically.
You can toggle lock status manually inside and outside the car by pressing SAVEKEY or holding X button on the controller.
When on foot the car will have a blip on the map to find it easily.

Ini file:
AUTOSAVE if enabled, every vehicle that player enters (except bikes, planes, boats 
and helis) will be saved and set as persistent, disable if you don't want every
car you steal to be persistent or you use quadbikes and cars without doors.
SAVEKEY the key to press to save car.
ALARM if enabled, it will be locking/unlocking sound and an alarm will be armed if
the vehicle is locked.
VOLUME the volume of locking/unlocking sound (if ALARM is enabled).
ENABLEUNSAVEKEY if enabled, unsave key functions.
UNSAVEKEY the unsave key that unsave the vehicle if you press it (disables just 
the persistence).
ROLLUPWINDOWS if enabled, all opened windows will be closed while locking vehicle.
COMINGHOME a feature that makes headlights stay on after locking for a few 
seconds.
INTERIORLIGHTS enable/disable interior lights.
UNLOCKINGLIGHTS enable/disable headlights on when unlocking.
BLINKERS enable/disable blinkers that blink once when unlocking and twice when 
locking.
FPS=60 FPS that your game is running with.



CHANGELOG:

3.1:
- Added controller support.
- Added automatic lock when the player is inside the car.
- Added ability to lock/unlock car manually inside and outside the car.
- Added compatibility with other personal vehicles mods.
- Added map blips.
- Improved lights times.
- Improved hints and notifications.

3.0.1:
- Fixed sound file location issue,
- Included "NAudio.dll".

3.0:
- Rewrote script,
- Added alarm and locking/unlocking sound,
- Added Roll up windows option,
- Added unsave vehicle key option,
- Added Coming Home option,
- Added compatibility with Coil Features,
- Added option to enable/disable interior lights,
- Added option to enable/disable headlights,
- Added option to enable/disable blinkers,
- Improved lights time,
- Improved hint display,
- Fixed interior lights doesn't turn off,
- Increased max vehicles to 20.

2.0:
- Rewrote the script,
- Fixed can't reenter nodoors vehicles and helis after exiting,
- Fixed lock not owned cars like when you exit a taxi it will be locked,
- Improved indicator lights blinking,
- Added ini file for toggling autosave vehicle and custom key to save vehicle.

1.0:
- first release.





CREDITS:

- Alexander Blade for ScriptHookV,
- Crosire for ScriptHookVDotNet.




NOTES!:

Do NOT redistribute or reupload without getting permission from the author of the
reuploaded file!

EEENNNJJJOOOYYYYYYYYYY  xD


                                       WTLS 